<%--=========================================================================== 
This is the page directive. Sets the content type and encoding.
Encoding of the response: UTF-8
Encoding of this JSP page: Cp1251 
===========================================================================--%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%--=========================================================================== 
Your own tag library. 
===========================================================================--%> 
<%@ taglib uri="/WEB-INF/st4" prefix="st"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Login Page</title>
<link rel="stylesheet" type="text/css" href="styles/st4.css" />
 
<jsp:include page="/WEB-INF/includes/scripts.jsp" />

<script type="text/javascript"> 
	function recoverPassword(){
		createPopupMessage("Your password is being sent to your mailbox");
		var request="ajax?command=password_recovery&"+jQuery('#login_form').serialize();
		jQuery.ajax ({
			url: request, 
			dataType : 'html',
			success: function (data, textStatus) { 
				closePopup(300);
			},
			error: function (msg) {
				closePopup(300); 
				alert("Error while password recovery \n"+msg);
			}
		});
		return false;
	}
</script>

</head>
<body>
	<c:if test="${not empty param.error}">
		<script type="text/javascript">createPopupError('${param.error}');</script>
	</c:if>

	<div class="page">
	<table class="picture_logo">
	
		<jsp:include page="/WEB-INF/includes/header.jsp" />

		<tr class="content">
		
			<td align="center">
				<h2><st:i18n key="page.label.booking_tickets"/></h2> <st:i18n key="page.label.credentials"/><br/><br/>
				<form id = "login_form" action="controller" method="post">

					<input type="hidden" name="command" value="login" />
					<table class="table">

						<tr>
							<td class="right" style = "width:100px;"><b><st:i18n key="pages.email"/></b></td>
							<td class="left"><input style = "width:220px;" name="email" type="text"
								size="15"></td>
						</tr>
						
						<tr>
							<td class="right"><b><st:i18n key="page.label.password"/></b></td>
							<td class="left"><input style = "width:220px;" name="password" type="password"
								size="15"></td>
						</tr>

					</table>
					<br/> <input type="submit" value="<st:i18n key="button.login"/>" />
				</form>
				<a href="controller?command=secure_goto&path=WEB-INF/jsp/registration.jsp"><st:i18n key="page.label.registration"/></a>
				<br/><br/>
				<a href="#" onclick="recoverPassword();"><st:i18n key="phrases.password_recovery"/></a>
			</td>
		</tr>

		<%--========================================================================--%>
		<jsp:include page="/WEB-INF/includes/footer.jsp" />
		<%--========================================================================--%>

	</table>
	</div>
	
<div onClick="javascript:void(0);" class="modal"></div>

</body>
</html>